package com.iyoudoock.citymine.adapter;

import android.content.Context;

import com.iyoudoock.citymine.widget.wheel.adapter.AbstractWheelTextAdapter;
import com.kvin.toolkit.utils.region.DistrictBean;

import java.util.List;

/**
 * Created by Kvin on 2017/5/27.
 */
public class DistrictAdapter extends AbstractWheelTextAdapter {
    private List<DistrictBean> cityList;

    public DistrictAdapter(Context context, List<DistrictBean> cityList) {
        super(context);
        this.cityList = cityList;
    }

    @Override
    protected CharSequence getItemText(int index) {
        return cityList == null ? null : cityList.get(index).getName();
    }

    @Override
    public int getItemsCount() {
        return cityList == null ? 0 : cityList.size();
    }

}
